Page({
    data:{
        eredarList:[
            // {headerImageUrl:'../../image/installheaderimg.jpg',name:"李老板",address:'湖北武汉',cnt:89},
            // {headerImageUrl:'../../image/installheaderimg.jpg',name:"张老板",address:'湖北武汉',cnt:12},
            // {headerImageUrl:'../../image/installheaderimg.jpg',name:"王老板",address:'湖北武汉',cnt:5},
            // {headerImageUrl:'../../image/installheaderimg.jpg',name:"李老板",address:'湖北武汉',cnt:8},
            // {headerImageUrl:'../../image/installheaderimg.jpg',name:"程老板",address:'湖北武汉',cnt:20},
            // {headerImageUrl:'../../image/installheaderimg.jpg',name:"李老板",address:'湖北武汉',cnt:16}
        ]
    },
    onLoad:function(options){
        this.setData({
        type:options.type
      })
       getApp().getUserInfo().then(res=>{
       var header={
             'openid':res.openid, //公用请求头
             'content-type': 'application/json'
         }
       this.setData({
        userInfo:res,
        header:header,
        current:1,
        showList:[]

       })  



    
      this.getAllMember();
     })

    },
     turnPage:function(){
       

        wx.switchTab({
                  url: '../../pages/home/home'
        })
        
    },
    getAllMember:function () {
      var _self=this;
         wx.request({
            url: getApp().globalData.baseUrl +'/wx/user/champion?current=1&pagesize=200',
            method:"GET",
            header: this.data.header,
            success: function(res) {
             console.log(res.data.obj.list)
             _self.setData({
              eredarList:res.data.obj.list
             })
            
         }
       })

    },
    onReady:function(){
        // 生命周期函数--监听页面初次渲染完成
       
    },
    onShow:function(){
        // 生命周期函数--监听页面显示
      
    },
    onHide:function(){
        // 生命周期函数--监听页面隐藏
    },
    onUnload:function(){
        // 生命周期函数--监听页面卸载
       
    },
    onPullDownRefresh: function() {
        // 页面相关事件处理函数--监听用户下拉动作
      
    },
    onReachBottom: function() {
        // 页面上拉触底事件的处理函数
       
    },
     onShareAppMessage:function(){
         return {
              title: '这是我在塔塔开的店铺',
               path: '/pages/eredar/eredar?type=share'
          }
    },
})